package cn.anquing.demo.mybatisplus.code.dao;

import cn.anquing.demo.mybatisplus.code.pojo.entity.User;
import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.google.common.base.Equivalence;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.checkerframework.checker.units.qual.A;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wqq
 * @since 2022-04-27
 */
public interface UserDao extends BaseMapper<User> {

    /**
     * 自定义sql
     * @param wrapper
     * @return
     */
    @SqlParser(filter = true)
    @Select("select * from user ${ew.customSqlSegment}")
    List<User> selectAll(@Param(Constants.WRAPPER) Wrapper<User> wrapper);

}
